
export const chartOption = {
  title: {
    text: "需量监控",
    x: "center",
    y: "top",
    textStyle: {
      fontSize: 16,
      color: '#fff',
    },
  },
  tooltip: {
    trigger: "axis",
    axisPointer: {
      type: "cross",
    },
  },
  legend: {
    textStyle: {
      color: "#fff",
    },
    top: "30",
  },

  axisPointer: {
    link: [
      {
        xAxisIndex: "all",
      },
    ],
  },
  grid: [
    {
      top: "80", right: "3%", bottom: "55", left: 60,
    },
  ],
  xAxis:
  {
    type: "category",
    boundaryGap: false,
    axisLine: { onZero: true },
    data: [],
  },
  yAxis: {
    type: "value",
    name: "功率（kw）",
    max: null,
    axisTick: {
      show: false,
    },
    axisLine: {
      show: true, // 不显示坐标轴线

    },
    splitLine: {
      show: true,
      lineStyle: {
        color: "rgba(255,255,255,0.2)"
      }
    },
  },
  series: [
    {
      name: "当天用户最大功率",
      data: [],
      type: "line",
      symbol: "circle",
      smooth: false,
      itemStyle: {
        color: "#76c0de", //改变折线点的颜色
        lineStyle: {
          color: "#76c0de", //改变折线颜色
        },
      },
      emphasis: {
        focus: "series",
      },
      markLine: {
        // symbol: ["none", "none"], // 去掉箭头
        data: [
          {
            name: "最大需量",
            xAxis: "2022-12-12 00:00:00",
            yAxis: null,
            symbol: "circle",
          },
        ],
        label: {
          show: true,
          position: "middle",
          formatter: "{b}({c})",
          color: '#fff',
        },
        lineStyle: {
          color: "#ffaaaa",
          width: 1,
        },
      },
    },
  ],
};
